
#include("includes/header.xhtml")


<div class="panel">
    <h3>View Activity</h3>
    <table bgcolor="#e4e4e4" border="0" cellpadding="3" cellspacing="1"
	align="center">
	
	<tr bgcolor="green">
		<td colspan="3"><b>Activity</b></td>
	</tr>
	<tr>
		<td bgcolor="#C3FDB8"> Process Name</td>
		<td bgcolor="#ffffff">:</td>
		<td bgcolor="#ffffff">$!process.processName</td>
	</tr>
	<tr>
		<td bgcolor="#C3FDB8">Activity Name</td>
		<td bgcolor="#ffffff">:</td>
		<td bgcolor="#ffffff">$!process.activityName</td>
	</tr>
	<tr>
		<td bgcolor="#C3FDB8">List of Pending</td>
		<td bgcolor="#ffffff">:</td>
		<td bgcolor="#ffffff">$!process.assigneeId</td>
	</tr>
	<tr>
		<td bgcolor="#C3FDB8">Date Created</td>
		<td bgcolor="#ffffff">:</td>
		<td bgcolor="#ffffff">$!process.dateCreated</td>
	</tr>
</table>
<br></br>
   	<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="1" align="center">
    <tr bgcolor="green" align="center">
        <td colspan="3"><b>Variable List</b></td>
    </tr>
    <form name = "form1" method="post">
     #foreach($j in $process.variable)
    <tr bgcolor="#ffffff" onmouseover="javascript:this.style.background='#C3FDB8';" onmouseout="javascript:this.style.background='#ffffff';">
        <td width="300">$!j.keySet().iterator().next() $!process.variable.keySet().iterator().next()</td>
        	
        <td align="center"><input type="text" value="$!process.variable.get($!process.variable.keySet().iterator().next())$!j.get($!j.keySet().iterator().next())" name="$!j.keySet().iterator().next()$!process.variable.keySet().iterator().next()" id="$!j.keySet().iterator().next()$!process.variable.keySet().iterator().next()" /></td>
        <td>	
        		<input type="button" value="set" onclick="setVariable('$!j.keySet().iterator().next()$!process.variable.keySet().iterator().next()')"/>
    	</td>	
    </tr>
    #end
    		</form>
        </table>
</div>
<script type="text/javascript">

function setVariable(variable){
    var url = "/yama/joget/inbox/variable/$process.activityId/" + variable+"/"+document.getElementById(variable).value;
	document.form1.action = url;
	document.form1.submit();
}
</script>

#include("includes/footer.xhtml")
